package com.qf.service.impl;

import com.qf.mapper.RoleMapper;
import com.qf.pojo.Role;
import com.qf.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 作者：冯国清
 * 项目名：com.qf.service.impl
 * 时间：2020/8/19 21:15
 * 描述:
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Resource
     private RoleMapper roleMapper;
    @Override
    public List<Role> getAllRolesByUsername(String username) {
        return roleMapper.getAllRolesByUsername(username);
    }

    @Override
    public Role findRoleByrid(int rid) {
        return roleMapper.findRoleByrid(rid);
    }

    @Override
    public int add(Role role) {
        return roleMapper.add(role);
    }

    @Override
    public int update(Role role) {
        return roleMapper.update(role);
    }

    @Override
    public int delete(int rid) {
        return roleMapper.delete(rid);
    }

    @Override
    public List<Role> getAllRole() {
        return roleMapper.getAllRole();
    }
}
